using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using TDV.Controles.Base.WinForm;
using BaseDatos.Comun;
using Aplicacion.Base.WinForm;
using BaseDatos;
using System.Data;
using System.Drawing;
using System.Windows.Forms;


namespace SCHD
{
    [ToolboxBitmap(typeof(ComboBox))]
    public partial class CboUso : BaseComboBox
    {
        private string coduso = "";

        public string Codigo
        {
            get { return coduso; }
            set { coduso = value; }
        }
        public CboUso()
        {
            InitializeComponent();            
        }

        public CboUso(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
        }
        public void CargarDatos()
        {
            try
            {
                LBUso uso = new LBUso();
                uso.Filtros.CodigoUso = this.coduso;
                uso.Buscar();
                this.ValueMember = "CodigoUso";
                this.DisplayMember = "DescripcionUso";
                this.DataSource = uso;

            }
            catch (Exception)
            {
                //throw;
            }
        }
    }
}
